Importing the Library
Over HTTP
Note
This will only work if the environment you are in supports loadstring.
Warning
If you are always importing from the latest release you could be subject to deprecation and other changes.
This method will download the release dynamically using loadstring & HttpGet.
local function importRelease(owner, repo, version, file)
local tag = (version == "latest" and "latest/download" or "download/"..version)
return loadstring(game:HttpGetAsync(("https://github.com/%s/%s/releases/%s/%s"):format(owner, repo, tag, file)), file)()
end
local cascade = importRelease("cascadeui", "Cascade", "latest", "dist.luau")
local function importRelease(owner, repo, version, file)
local tag = (version == "latest" and "latest/download" or "download/"..version)
return loadstring(game:HttpGetAsync(("https://github.com/%s/%s/releases/%s/%s"):format(owner, repo, tag, file)), file)()
end
local cascade = importRelease("cascadeui", "Cascade", "v1.3.1", "dist.luau")
Warning
writefile, readfile, and makefolder (or equivalent filesystem functions) must be supported in your environment for this method to work.
local function importReleaseCached(owner, repo, version, file)
local tag = (version == "latest" and "latest/download" or "download/" .. version)
local url = ("https://github.com/%s/%s/releases/%s/%s"):format(owner, repo, tag, file)
local cacheFolder = ".cache"
if not isfolder(cacheFolder) then
makefolder(cacheFolder)
end
local cacheVersion = version:gsub("[^%w%-_%.]", "-")
local cacheFile = file:gsub("[^%w%-_%.]", "-")
local cachePath = ("%s/%s-%s"):format(cacheFolder, cacheVersion, cacheFile)
if not isfile(cachePath) then
writefile(cachePath, game:HttpGetAsync(url))
end
return loadstring(readfile(cachePath), file)()
end
local cascade = importReleaseCached("cascadeui", "Cascade", "latest", "dist.luau")
importReleaseis just a helper function, if you didn't want to use it you can simplyloadstring:HttpGetthe raw link to the release content.
Local Build
- Download a valid release: Cascade Releases
- Place the
luaumodule into your project (e.g., underpackages/).
Building From Source
Proceed to Building From Source